package com.dmagic.cms.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.hibernate.annotations.Where;

import com.dmagic.cms.common.Constants;
import com.dmagic.cms.common.entity.ModifyInfoEntity;

@Entity
@Table(name = "dmagic_linked_heat_map")
@Where(clause = ModifyInfoEntity.ISOBSOLETE_DATE_IS_NULL)
public class LinkedHeatMap extends ModifyInfoEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6020116132652801603L;

	private Long linkedHeatMapId;

	private Boolean linkedHeatMapStatus = false;

	private Long linkedHeatMapLinkedId;

	private Integer linkedHeatMapType;

	public LinkedHeatMap() {
		super();
	}

	public enum HeatMapType {
		news(0), product(1), successfulCase(2);
		private Integer key;

		private HeatMapType(Integer key) {
			this.key = key;
		}

		public Integer getValue() {
			return key;
		}
	}

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = Constants.ID_GENERATOR)
	@TableGenerator(name = Constants.ID_GENERATOR, // Generator Name which same
													// with
	// generator
	table = Constants.ID_GENERATOR, // Generator Table Name
	pkColumnName = Constants.PK_COLUMNNAME, // Generator Table column Id name
	valueColumnName = Constants.VALUE_COLUMN_NAME, // Generator Table column Id
													// value
	pkColumnValue = "LinkedHeatMap", // entity Name
	allocationSize = (Constants.ID_GENERATOR_ALLLCATIONSIZE), initialValue = Constants.ID_GENERATOR_INITIALVALUE)
	public Long getLinkedHeatMapId() {
		return linkedHeatMapId;
	}

	public void setLinkedHeatMapId(Long linkedHeatMapId) {
		this.linkedHeatMapId = linkedHeatMapId;
	}

	public Boolean getLinkedHeatMapStatus() {
		return linkedHeatMapStatus;
	}

	public void setLinkedHeatMapStatus(Boolean linkedHeatMapStatus) {
		this.linkedHeatMapStatus = linkedHeatMapStatus;
	}

	public Long getLinkedHeatMapLinkedId() {
		return linkedHeatMapLinkedId;
	}

	public void setLinkedHeatMapLinkedId(Long linkedHeatMapLinkedId) {
		this.linkedHeatMapLinkedId = linkedHeatMapLinkedId;
	}

	public Integer getLinkedHeatMapType() {
		return linkedHeatMapType;
	}

	public void setLinkedHeatMapType(Integer linkedHeatMapType) {
		this.linkedHeatMapType = linkedHeatMapType;
	}

}
